<% add_decidim_meta_tags(
  description: translated_attribute(current_component.participatory_space.try(:description)),
  title: component_name,
  url: documents_url,
  resource: current_component) %>

<% content_for :aside do %>
  <h1 class="title-decorator"><%= component_name %></h1>
<% end %>

<%= render layout: "layouts/decidim/shared/layout_two_col" do %>

  <%= render partial: "decidim/shared/component_announcement" %>

  <section id="collaborative_texts" class="layout-main__section layout-main__heading">
    <% if paginate_documents.empty? %>
      <%= cell("decidim/announcement", t("empty", scope: "decidim.collaborative_texts.documents.index")) %>
    <% else %>
      <h2 class="h5 md:h3 decorator"><%= t("count", scope: "decidim.collaborative_texts.documents.index", count: documents.length) %></h2>
    <% end %>

    <% paginate_documents.each do |document| %>
      <%= card_for document, size: :l %>
    <% end %>

    <%= decidim_paginate paginate_documents %>
  </section>

<% end %>
